package com.asl.website.jobPosition.service.impl;

import java.util.List;
import com.asl.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.asl.website.jobPosition.mapper.AslJobPositionMapper;
import com.asl.website.jobPosition.domain.AslJobPosition;
import com.asl.website.jobPosition.service.IAslJobPositionService;

/**
 * 职位发布Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-22
 */
@Service
public class AslJobPositionServiceImpl implements IAslJobPositionService 
{
    @Autowired
    private AslJobPositionMapper aslJobPositionMapper;

    /**
     * 查询职位发布
     * 
     * @param id 职位发布主键
     * @return 职位发布
     */
    @Override
    public AslJobPosition selectAslJobPositionById(Long id)
    {
        return aslJobPositionMapper.selectAslJobPositionById(id);
    }

    /**
     * 查询职位发布列表
     * 
     * @param aslJobPosition 职位发布
     * @return 职位发布
     */
    @Override
    public List<AslJobPosition> selectAslJobPositionList(AslJobPosition aslJobPosition)
    {
        return aslJobPositionMapper.selectAslJobPositionList(aslJobPosition);
    }

    /**
     * 新增职位发布
     * 
     * @param aslJobPosition 职位发布
     * @return 结果
     */
    @Override
    public int insertAslJobPosition(AslJobPosition aslJobPosition)
    {
        aslJobPosition.setCreateTime(DateUtils.getNowDate());
        return aslJobPositionMapper.insertAslJobPosition(aslJobPosition);
    }

    /**
     * 修改职位发布
     * 
     * @param aslJobPosition 职位发布
     * @return 结果
     */
    @Override
    public int updateAslJobPosition(AslJobPosition aslJobPosition)
    {
        aslJobPosition.setUpdateTime(DateUtils.getNowDate());
        return aslJobPositionMapper.updateAslJobPosition(aslJobPosition);
    }

    /**
     * 批量删除职位发布
     * 
     * @param ids 需要删除的职位发布主键
     * @return 结果
     */
    @Override
    public int deleteAslJobPositionByIds(Long[] ids)
    {
        return aslJobPositionMapper.deleteAslJobPositionByIds(ids);
    }

    /**
     * 删除职位发布信息
     * 
     * @param id 职位发布主键
     * @return 结果
     */
    @Override
    public int deleteAslJobPositionById(Long id)
    {
        return aslJobPositionMapper.deleteAslJobPositionById(id);
    }
}
